/*
 * @Description: 页面内容组件
 * @Author: Rfan
 * @Date: 2022-10-28 13:55:59
 * @LastEditTime: 2022-10-28 15:01:04
 */

import { Button, Space } from 'antd';
import classnames from 'classnames/bind';
import { observer } from 'mobx-react-lite';
import { routerActions, routerState } from '@/store/routerStore';
import styles from '../styles/recycleBinMain.module.scss';
import { useEffect } from 'react';

const cx = classnames.bind(styles);

const PageContent = () => {
  console.log('orgNavTree', routerState.orgNavTree);

  useEffect(() => {
    if (routerState.orgNavTree?.length <= 0) {
      routerActions.getNavList();
    }
  }, [routerState.orgNavTree]);
  return (
    <div className={cx('page-content')}>
      <Space>
        {routerState.orgNavTree.map((item: any) => (
          <Button key={item.id}>{item.rightsName}</Button>
        ))}
      </Space>
    </div>
  );
};

export default observer(PageContent);
